/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Hndlr;

import java.util.HashMap;
import javax.naming.ldap.HasControls;
import objetos.Administrador;

/**
 *
 * @author jota
 */
public class HndlrAdmin{
    
    private String mailAdmin;
    
    private HndlrAdmin() {
        
        listAdmins = new HashMap<String, Administrador>();
        
        Administrador adm = new Administrador();
        listAdmins.put(adm.getCorreo(),adm);
        
    }
    
    public static HndlrAdmin getInstance() {
        return HndlrAdminHolder.INSTANCE;
    }
    
    private static class HndlrAdminHolder {

        private static final HndlrAdmin INSTANCE = new HndlrAdmin();
    }
   
    private HashMap<String,Administrador> listAdmins;
   
    public boolean containsKey (String clave)
    {
        
         return listAdmins.containsKey(clave);
    }

    public Administrador get(String clave)
    {
        return listAdmins.get(clave);
    }

    public HashMap<String, Administrador> getListAdmins() {
        return listAdmins;
    }

    public void setListAdmins(HashMap<String, Administrador> listAdmins) {
        this.listAdmins = listAdmins;
    }

    public String getMailAdmin() {
        return mailAdmin;
    }

    public void setMailAdmin(String mailAdmin) {
        this.mailAdmin = mailAdmin;
    }
    
    public void clear(){
        
        listAdmins.clear();
        mailAdmin = "";
        
    }
    
}

   
